package com.hice.demo.sbdbra.common.dto;

public enum ResultCodeEnum {
    SUCCESS(true, "10000", "业务处理成功"),

    ERROR_UNKNOW(false, "20000", "服务不可用"),

    ERROR_AUTH(false, "20001", "鉴权失败"),

    ERROR_AUTH_TIME_OUT(false, "20002", "访问授权过期"),

    ERROR_REQ_OFTEN(false, "20003", "请求频繁"),

    ERROR_MISSING_PARAMS(false, "40001", "缺少必须的参数"),

    ERROR_INVALID_PARAMS(false, "40002", "非法参数"),

    ERROR_HANDLE(false, "40004", "业务处理失败"),

    ERROR_NOT_ALLOW(false, "40006", "权限不足");

    private boolean success;
    private String code;
    private String msg;

    private ResultCodeEnum(boolean success, String code, String msg) {
        this.success = success;
        this.code = code;
        this.msg = msg;
    }

    public boolean isSuccess() {
        return this.success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}